import request from '@/utils/request'


export function userRemove(query) {
  return request({
    url: '/user/userRemove',
    method: 'get',
    params: {userId:query}
  })
}

export function fetchList(query) {
  return request({
    url: '/user/list',
    method: 'get',
    params: query
  })
}

export function listAddress(query) {
  return request({
    url: '/address/list',
    method: 'get',
    params: query
  })
}

// export function listOpenEvent(query) {
//   return request({
//     url: '/address/open',
//     method: 'get',
//     params: query
//   })
// }

export function getPayMemberNotify() {
  return request({
    url: '/config/getPayMemberNotify',
    method: 'get'
  })
}

export function getLevelMemberNotify() {
  return request({
    url: '/config/getLevelMemberNotify',
    method: 'get'
  })
}

export function listCollect(query) {
  return request({
    url: '/collect/list',
    method: 'get',
    params: query
  })
}

export function listFeedback(query) {
  return request({
    url: '/feedback/list',
    method: 'get',
    params: query
  })
}

export function listFootprint(query) {
  return request({
    url: '/footprint/list',
    method: 'get',
    params: query
  })
}

export function listHistory(query) {
  return request({
    url: '/history/list',
    method: 'get',
    params: query
  })
}


export function userOption(query) {
  return request({
    url: '/user/option',
    method: 'get',
    params: query
  })
}


export function userBill(query) {
  return request({
    url: '/user/rechargeConsumptionList',
    method: 'get',
    params: query
  })
}

export function userInfo(userId) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { userId }
  })
}


export function couponCount(userId) {
  return request({
    url: '/user/queryUserCoupon',
    method: 'get',
    params: { userId }
  })
}


export function billStatistics(userId) {
  return request({
    url: '/user/statistics',
    method: 'get',
    params: { userId }
  })
}

export function resetUserPwd(data) {
  return request({
    url: '/user/resetpwd',
    method: 'put',
    params: data
  })
}

export function updateIntegral(data) {
  return request({
    url: '/user/integral',
    method: 'put',
    params: data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'put',
    data
  })
}
export function levelMemberList(data) {
  return request({
    url: '/levelMember/list',
    method: 'get',
    params: data
  })
}

export function levelupdateStatus(data) {
  return request({
    url: '/levelMember/updateStatus',
    method: 'put',
    params: data
  })
}
export function levelMemberAdd(data) {
  return request({
    url: '/levelMember/add',
    method: 'put',
    data
  })
}


export function queryMemberNoChildren(data) {
  return request({
    url: '/levelMember/queryMemberNoChildren',
    method: 'get',
    params: data
  })
}
export function payMemberList(data) {
  return request({
    url: '/payMember/list',
    method: 'get',
    params: data
  })
}

export function levelMemberDetail(data) {
  return request({
    url: '/levelMember/detail',
    method: 'get',
    params: data
  })
}
export function levelMemberUpdata(data) {
  return request({
    url: '/levelMember/update',
    method: 'put',
    data
  })
}


export function levelMemberDelete(memberId) {
  return request({
    url: '/levelMember/delete',
    method: 'delete',
    params: { memberId }
  })
}
export function ShopShopLocations(data) {
  return request({
    url: '/shop/shopLocations',
    method: 'get',
    params: data
  })
}
export function payMemberAdd(data) {
  return request({
    url: '/payMember/add',
    method: 'put',
    data
  })
}
export function payMemberDelete(memberId) {
  return request({
    url: '/payMember/detail',
    method: 'get',
    params: { memberId }
  })
}
export function payMemberUpdate(data) {
  return request({
    url: '/payMember/update',
    method: 'put',
    data
  })
}


export function payMemberDeletes(memberId) {
  return request({
    url: '/payMember/delete',
    method: 'delete',
    params: { memberId }
  })
}
export function payMemberUpdateStatus(memberId) {
  return request({
    url: '/payMember/updateStatus',
    method: 'put',
    params: { memberId }
  })
}
export function payMemberUserLogList(data) {
  return request({
    url: '/payMemberUserLog/list',
    method: 'get',
    params: data
  })
}
export function payMemberUserList(data) {
  return request({
    url: '/payMemberUser/list',
    method: 'get',
    params: data
  })
}
export function payMemberNotify(data) {
  return request({
    url: '/config/payMemberNotify',
    method: 'put',
    data
  })
}
export function levelpayMemberNotify(data) {
  return request({
    url: '/config/levelMemberNotify',
    method: 'put',
    data
  })
}

export function updatePoint(data) {
  return request({
    url: '/user/updatePoint',
    method: 'put',
    data
  })
}

export function pointDetail(data) {
  return request({
    url: '/user/pointDetail',
    method: 'get',
    params:data,
  })
}

export function grantExtenCoupon(data) {
  return request({
    url: '/user/grantExtenCoupon',
    method: 'post',
    params: data,
  })
}

// 付费会员明细
export function getPayMemberList(data) {
  return request({
    url: '/payMemberUserLog/listById',
    method: 'get',
    params: data,
  })
}

// 礼品卡明细
export function getGiftCardDetail(data) {
  return request({
    url: '/giftcard/giftCardUserDetail',
    method: 'get',
    params: data,
  })
}

// 订阅
export function getSubscriList(data) {
  return request({
    url: '/lumiere/subscribeUserLog/listById',
    method: 'get',
    params: data,
  })
}

export function getLoginHistory(){
  return request({
    url: '/admin/loginHistory',
    method: 'get',
  })
}
